#ifndef CTETRA_VERTEX_H
#define CTETRA_VERTEX_H

#include <irrlicht.h>
#include "STetraVertex.h"
#include "IGameObject3d.h"

/*
using namespace irr;
using namespace MarCore;
*/

namespace MarCore
{

class CTetraVertex : public IGameObject3d
{

    public:

        //! Default Constructor
        CTetraVertex();

        //! Constructor
        CTetraVertex( core::vector3df pos );

        //! Constructor
        CTetraVertex( STetraVertex* vdata );

        //! Destructor
        ~CTetraVertex();

        //! Gets and returns pointers to all faces it is a part of
        //@ CVQFace* getFaces();

        //! Returns current position.
        core::vector3df getPosition();

        //! Returns mass
        f32 getMass();

        //! Sets position
        void setPosition( core::vector3df pos );

        //! Sets the parent 'rod'
        void setRod( IGameObject* new_rod );

        //! Adds a child 'crank'
        void addCrank( const IGameObject& new_crank );

        //! Run a logic tik.
        void stroke();

    private:

        f32 mass; //simple mass
        f32 merging_limit; //defines at what point vertices merge, in a case of two, the one with the smallest merges first
        //f32 strength;
        f32 transform_retention;
        f32 elasticity; //how much it can move from its "elastic_init" point and still spring back

}; //end class CTetraVertex

}; //end namespace MarCore

#endif
